package com.easy.dev.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.easy.dev.entity.Dict;
import com.easy.dev.entity.DictDetail;
import com.easy.dev.mapper.DictDetailMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DictDetailServiceImpl extends BaseServiceImpl<DictDetail>{

    @Autowired
    private DictDetailMapper dictDetailMapper;

    BaseMapper getMapper() {
        return this.dictDetailMapper;
    }

    public List<DictDetail> findByDictIdIn(List<Integer> dictIds) {
        QueryWrapper<DictDetail> wrapper = new QueryWrapper();
        wrapper.in("dict_id", dictIds);
        return dictDetailMapper.selectList(wrapper);
    }
};